package com.wzk.travelspringboot.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzk.travelspringboot.controller.admin.dto.TicketOrderDTO;
import com.wzk.travelspringboot.entity.TicketOrder;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: WangZiKang
 * @Date: 2025/1/19 16:18
 */
public interface TicketOrderDAO extends BaseMapper<TicketOrder> {

    int changeOrderStatus(@Param("orderNumber") String orderNumber, @Param("status") int status);

    TicketOrder getByOrderNumber(String orderNumber);

    List<TicketOrder> queryOrderByUserId(long userId);

    List<TicketOrder> queryToDayAmount(@Param("from") LocalDateTime from, @Param("to") LocalDateTime to);

    List<TicketOrder> queryCurrWeek();

    int changeOrderUsed(String on);

}
